import 'package:flutter/material.dart';
import 'package:syria_sports/core/app_export.dart';
import 'package:shimmer/shimmer.dart';

import '../../../../widgets/info_view_widget.dart';


class ProfileLoadingWidget extends StatelessWidget {
  const ProfileLoadingWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: SingleChildScrollView(
        child: Container(
            width: double.maxFinite,
            padding: EdgeInsets.symmetric(vertical: 36.v),
            child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Shimmer.fromColors(
                    baseColor: Colors.grey,
                    highlightColor: Colors.white,
                    child: Container(
                      margin: EdgeInsets.all(2),
                      width: 66*2,
                      height: 66*2,
                      decoration: BoxDecoration(
                        shape: BoxShape.circle,
                        color: Colors.black,
                      ),
                    ),
                  ),
                  Padding(
                    padding: EdgeInsets.only(top: 9.v, bottom: 14.v),
                    child: Column(
                      children: [
                        Shimmer.fromColors(
                          baseColor: Colors.grey,
                          highlightColor: Colors.white,
                          child: Container(
                            width: 100,
                            height: 18,
                            decoration: BoxDecoration(
                              color: Colors.grey,
                              borderRadius: BorderRadius.circular(4),
                            ),
                          ),
                        ),
                        SizedBox(height: 8.v),
                        Shimmer.fromColors(
                          baseColor: Colors.grey,
                          highlightColor: Colors.white,
                          child: Container(
                            width: 120,
                            height: 14,
                            decoration: BoxDecoration(
                              color: Colors.grey,
                              borderRadius: BorderRadius.circular(4),
                            ),
                          ),
                        ),
                      ],
                    ),
                  ),

                  Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Text('تقييم اللاعب',
                            style: theme.textTheme.titleLarge),
                        Shimmer.fromColors(
                          baseColor: Colors.grey,
                          highlightColor: Colors.white,
                          child: Container(
                            width: 55,
                            height: 18,
                            decoration: BoxDecoration(
                              color: Colors.grey,
                              borderRadius: BorderRadius.circular(4),
                            ),
                          ),
                        ),

                      ],
                    ),
                  ),
                  const InfoViewWidget(
                    value: false,
                    title: 'تفاصيل التقييم',
                    children: [

                    ],
                  ),

                  Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Text('مستوى اللاعب',
                            style: theme.textTheme.titleLarge),
                        Shimmer.fromColors(
                          baseColor: Colors.grey,
                          highlightColor: Colors.white,
                          child: Container(
                            width: 55,
                            height: 18,
                            decoration: BoxDecoration(
                              color: Colors.grey,
                              borderRadius: BorderRadius.circular(4),
                            ),
                          ),
                        ),

                      ],
                    ),
                  ),
                  InfoViewWidget(
                    value: false,
                    title: 'المستويات',
                    iconImage: ImageConstant.icLevel ,
                    children: [

                    ],
                  ),
                  const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Divider(color: Colors.white54),
                  ),
                  if(PrefUtils.isAdmin())
                    const Column(
                      children: [
                        InfoViewWidget(
                          icon: Icons.contact_mail_outlined,
                          value: false,
                          title: 'معلومات التواصل',
                          children: [

                          ],
                        ),
                        Padding(
                          padding: EdgeInsets.all(8.0),
                          child: Divider(color: Colors.white54),
                        ),
                      ],
                    ),

                  /*Card(
                    color: Colors.white10,
                    child: ListTile(
                      onTap: (){
                        Navigator.push(context, MaterialPageRoute(builder: (context) => UserSubscriptionsScreen(
                          user:user,
                        )));
                      },
                      leading: Icon(Icons.directions_walk,color:Colors.orange.withOpacity(.6)),
                      title: Text("التمارين المنتسب لها",style: theme.textTheme.titleSmall),
                      //subtitle: Text(user.level!,style: CustomTextStyles.bodySmallOnPrimary),
                      trailing: CustomImageView(
                        imagePath: ImageConstant.imgArrowLeftBlueGray300,
                        height: 32.adaptSize,
                        width: 32.adaptSize,
                      ),
                    ),
                  ),
                  Card(
                    color: Colors.white10,
                    child: ListTile(
                      onTap: (){
                        Navigator.push(context, MaterialPageRoute(builder: (context) => UserAttendancesListScreen(
                          user:user,
                        )));
                      },
                      leading: Icon(Icons.directions_walk,color:Colors.orange.withOpacity(.6)),
                      title: Text("تسجيلات الحضور",style: theme.textTheme.titleSmall),
                      //subtitle: Text(user.level!,style: CustomTextStyles.bodySmallOnPrimary),
                      trailing: CustomImageView(
                        imagePath: ImageConstant.imgArrowLeftBlueGray300,
                        height: 32.adaptSize,
                        width: 32.adaptSize,
                      ),
                    ),
                  ),*/


                ])),
      ),
    );
  }
}
